﻿<UserControl xmlns:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"  
             x:Class="Common.Controls.ValidateClaims"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     
    xmlns:liquid="clr-namespace:Liquid;assembly=Liquid"     
    xmlns:extensions="clr-namespace:SLExtensions.Controls;assembly=SLExtensions.Controls"
             xmlns:extended="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    xmlns:controls="clr-namespace:Common.Controls" 
             xmlns:tb="clr-namespace:Microsoft.Windows.Controls;assembly=Microsoft.Windows.Controls.WatermarkedTextBox"
             xmlns:common_controls="clr-namespace:Common.Controls"
    Width="400" Height="Auto">
    <Border Padding="5" CornerRadius="10">
        <Border.Background>
            <LinearGradientBrush StartPoint="0,0" EndPoint=".5,1">
                <GradientStop Color="LightGray" Offset="0"/>
                <GradientStop Color="Gray" Offset=".4"/>
                <GradientStop Color="Gray" Offset=".6"/>
                <GradientStop Color="LightGray" Offset="1"/>
            </LinearGradientBrush>
        </Border.Background>
        <StackPanel Orientation="Vertical">
            <StackPanel Orientation="Vertical" Margin="0,8,0,8">
                <controls:Logo Margin="0,8,0,0" HorizontalAlignment="Center" />
                <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="16" 
                               Text="Account Information"/>
                <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap"
                           Margin="5,5,0,0"
                               Text="The following information is required to complete this survey. Please fill in this information and click 'submit'."/>
                </StackPanel>
            <Grid x:Name="LayoutRoot" VerticalAlignment="Stretch" Margin="10">
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>                              
                <Grid x:Name="pnlEmailAddress" Tag="11" Grid.Row="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>                    
                    <!--
                    <tb:WatermarkedTextBox Margin="5" TextChanged="TextBox_TextChanged" Watermark="Email Address ..."
                             Grid.Column="1" x:Name="tbEmailAddress" HorizontalAlignment="Stretch"/>-->
                    <common_controls:TextboxValidated x:Name="tbEmailAddress" TextChanged="TextBox_TextChanged"
                                                      ValidationExpression="^([a-zA-Z0-9_\-\.+]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$" 
                                                      Margin="5" Grid.Column="1" Watermark="Email Address ..."/>
                </Grid>
                <Grid x:Name="pnlStudentId" Tag="12" Grid.Row="1">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>                    
                    <tb:WatermarkedTextBox Margin="5" TextChanged="TextBox_TextChanged" 
                                           Watermark="Student ID ..."
                                           x:Name="tbStudentId" Grid.Column="1" HorizontalAlignment="Stretch"/>
                </Grid>
                <Grid x:Name="pnlFirstName" Tag="8" Grid.Row="2">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>                    
                    <tb:WatermarkedTextBox Margin="5" x:Name="tbFirstName" 
                                           Watermark="First Name ..."
                                           TextChanged="TextBox_TextChanged"
                             Grid.Column="1" HorizontalAlignment="Stretch"/>
                </Grid>
                <Grid x:Name="pnlLastName" Tag="10" Grid.Row="3">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>                    
                    <tb:WatermarkedTextBox Margin="5" TextChanged="TextBox_TextChanged"
                             x:Name="tbLastName" Grid.Column="1"
                                           Watermark="Last Name ..."
                             HorizontalAlignment="Stretch"/>
                </Grid>
                <Grid x:Name="pnlGender" Tag="1" Grid.Row="4">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>                                    
                    <ComboBox x:Name="ddlGender" Margin="5" Grid.Column="1" HorizontalAlignment="Stretch">
                        <ComboBoxItem IsSelected="True" Content="Select a gender ..."/>
                        <ComboBoxItem Content="Female"/>
                        <ComboBoxItem Content="Male"/>
                        <ComboBoxItem Content="Unspecified/Other"/>
                    </ComboBox>
                </Grid>
                <Grid x:Name="pnlBirthDate" Tag="2" Grid.Row="5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>                   
                    <TextBlock Text="Birthdate" Margin="5,10,5,5" Grid.Column="1"/> 
                    <basics:DatePicker x:Name="calBirthDate" Grid.Column="1" 
                                       Margin="75,5,0,5"
                                       SelectedDateChanged="calBirthDate_DisplayDateChanged"/>
                    
                </Grid>
                <Grid x:Name="pnlAddress" Tag="3" Grid.Row="6">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>                    
                    <tb:WatermarkedTextBox x:Name="tbAddress" TextChanged="TextBox_TextChanged"
                                           Watermark="Street Address Line 1 ..."
                             Margin="5" Grid.Column="1" HorizontalAlignment="Stretch"/>
                </Grid>
                <Grid x:Name="pnlCity" Tag="4" Grid.Row="7">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>                                       
                    <tb:WatermarkedTextBox x:Name="tbCity" TextChanged="TextBox_TextChanged"
                                           Watermark="City"
                             Margin="5" Grid.Column="1" 
                             HorizontalAlignment="Stretch"/>
                </Grid>
                <Grid x:Name="pnlState" Tag="5" Grid.Row="8">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>                                      
                    <tb:WatermarkedTextBox x:Name="tbState" Margin="5" Grid.Column="1" 
                                           Watermark="State ..."
                                           HorizontalAlignment="Stretch"/>
                </Grid>
                <Grid x:Name="pnlZipCode" Tag="6" Grid.Row="9">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>                                        
                    <tb:WatermarkedTextBox x:Name="tbZipCode" TextChanged="TextBox_TextChanged"
                             Watermark="Postal Code"
                             Margin="5" Grid.Column="1" HorizontalAlignment="Stretch"/>
                </Grid>
                <Grid x:Name="pnlCountry" Tag="7" Grid.Row="10">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>                                        
                    <tb:WatermarkedTextBox x:Name="tbCountry" TextChanged="TextBox_TextChanged"
                                           Watermark="Country ..."
                             Margin="5" Grid.Column="1" HorizontalAlignment="Stretch"/>
                </Grid>
            </Grid>
            <StackPanel Orientation="Horizontal" Margin="15,0,0,10">
                <Button x:Name="btnSubmit" Content="Submit" IsEnabled="False" Click="btnSubmit_Click"/>
                <Button x:Name="btnCancel" Margin="10,0,0,0" IsEnabled="False" Content="Cancel" Click="btnCancel_Click"/>
            </StackPanel>
            
        </StackPanel>
    </Border>
</UserControl>
